
import getpass
card = int(getpass.getpass("请输入数字："))
print(type(card))
count = 0

while True:
    if count <4:
        user_guess = int(input("请猜一猜我想的是什么数字呢："))
        print(type(user_guess))
        if card == user_guess:
            print("恭喜你答对了！")
            break
        elif card > user_guess:
            print("太小了，往大了猜哦！")
        else:
            print("太大了，往小的猜哦！")
    else:
        print("哈哈哈哈~你没有猜出来哦~")
        break
    count = count+1
